﻿using LCL.Config;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LCL.LData
{
    /// <summary>
    /// IDbScriptBuilder 的摘要说明。
    /// </summary>
    public interface IDbScriptBuilder
    {
        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        DbConfigInfo DbConfig { get; set; }

        #region 生成数据库表创建脚本
         /// <summary>
        /// 生成数据库表创建脚本
        /// </summary>
        /// <returns></returns>
        string CreateTabScript(string dbname, string tablename);
        #endregion

        #region 生成SQL查询语句
        /// <summary>
        /// 生成Select查询语句
        /// </summary>
        /// <param name="dbname">库名</param>
        /// <param name="tablename">表名</param>
        /// <returns></returns>
        string GetSQLSelect(string dbname, string tablename);
        /// <summary>
        /// 生成update查询语句
        /// </summary>
        /// <param name="dbname">库名</param>
        /// <param name="tablename">表名</param>
        /// <returns></returns>
        string GetSQLUpdate(string dbname, string tablename);
        /// <summary>
        /// 生成update查询语句
        /// </summary>
        /// <param name="dbname">库名</param>
        /// <param name="tablename">表名</param>
        /// <returns></returns>
        string GetSQLDelete(string dbname, string tablename);
        /// <summary>
        /// 生成Insert查询语句
        /// </summary>
        /// <param name="dbname">库名</param>
        /// <param name="tablename">表名</param>
        /// <returns></returns>
        string GetSQLInsert(string dbname, string tablename);
        #endregion
    }
}
